<cfcomponent>
<cffunction name="show" access="public" returntype="void" output="yes" hint="Used to create a custom button with a custom link and icon">
    <cfargument name="btext" type="string" required="no" default="Submit" hint="text you want on the button">
    <cfargument name="url" type="string" required="no" default="" hint="full url to open when clicked">
    <cfargument name="img" type="string" required="no" default="data.png" hint="name of image to use (must be in the images folder in admin)">
    <cfargument name="target" type="string" required="no" default="top" hint="top for same page or blank for new window">
    <cfargument name="tooltip" type="string" required="no" default="" hint="Tooltip text on hover.">
    <cfargument name="jscript" type="string" required="no" default="" hint="Javascript code or function to execute when clicked.">
    <cfargument name="folder" type="string" required="no" default="/" hint="Folder in which the icon is located (defualt is admin/images/).">
    <cfargument name="isdisabled" type="numeric" required="no" default="0" hint="Disables the button.">
    <cfprocessingdirective suppresswhitespace="yes">
        <cfif target IS 'top'>
        <cfsavecontent variable="buttonoutput">
        <cfoutput>
<cfif isdisabled IS 0>
<div align="right" style="white-space: nowrap; padding-left: 2px; float: left;" alt="#tooltip#" title="#tooltip#">
<div id="navbuttons" <cfif len(trim(url)) GT 0>onclick="window.location.href = '#url#';"</cfif><cfif len(trim(url)) IS 0 AND len(trim(jscript)) gT 0>onclick="#jscript#"</cfif> style="white-space: nowrap; overlap: hidden; padding-top: 4px; padding-bottom: 4px; padding-right: 8px; padding-left: 2px;">
  <img src="#request.absoluteadminpath#images#folder##img#" id="navbuttonimage" width="24" alt="#tooltip#" title="#tooltip#" align="absmiddle" />&nbsp;&nbsp;#btext#
</div>
</div>
<cfelse>
<div align="right" style="min-width: #width#px; float: left;" alt="#tooltip#" title="#tooltip#">
<div id="navbuttons_disabled" style="white-space: nowrap; overlap: hidden; padding-top: 4px; padding-bottom: 4px; padding-right: 2px; padding-left: 2px;">
  <img src="#request.absoluteadminpath#images#folder##img#" id="navbuttonimage_disabled" width="24" alt="#tooltip#" title="#tooltip#" align="absmiddle"  />&nbsp;&nbsp;#btext#
</div>
</div>
</cfif>
        </cfoutput>
        </cfsavecontent>
		<cfoutput>#buttonoutput#</cfoutput>
		</cfif>
        </cfprocessingdirective>
</cffunction>
</cfcomponent>